Precision machine vision inspection systems (or “vision systems,” for short) can be utilized to obtain precise dimensional measurements of inspected objects and to inspect various other object characteristics. Such systems may include a computer, a camera and optical system, and a precision stage that is movable in multiple directions to allow workpiece inspection. One exemplary prior art system, which can be characterized as a general-purpose “off-line” precision vision system, is the commercially available QUICK VISION® series of PC-based vision systems and QVPAK® software available from Mitutoyo America Corporation (MAC), located in Aurora, Ill. The features and operation of the QUICK VISION® series of vision systems and the QVPAK® software are generally described, for example, in the QVPAK 3D CNC Vision Measuring Machine User's Guide, published January 2003, and the QVPAK 3D CNC Vision Measuring Machine Operation Guide, published September 1996, each of which is hereby incorporated by reference in its entirety. This type of system is able to use a microscope-type optical system and move the stage so as to provide inspection images of either small or relatively large workpieces at various magnifications.
General purpose precision machine vision inspection systems, such as the QUICK VISION™ system, are also generally programmable to provide automated video inspection. Such systems typically include GUI features and predefined image analysis “video tools” such that operation and programming can be performed by “non-expert” operators. For example, U.S. Pat. No. 6,542,180 (hereinafter “the '180 patent”), which is incorporated herein by reference in its entirety, teaches such a vision system that uses automated video inspection. Video tools may be called simply “tools,” for short. For example, edge-detection tools may include point tools for detecting a point on an edge, box tools for detecting the location and direction of an edge located in a region of interest defined by the box tool, and so on.
As taught in the '180 patent, automated video inspection metrology instruments generally have a programming capability that allows an automatic inspection event sequence to be defined by the user for each particular workpiece configuration. Such programming can be implemented as text-based programming, or through a recording mode that progressively “learns” the inspection event sequence by storing a sequence of machine control instructions and individual video tool parameters corresponding to a sequence of inspection operations defined and/or performed by a user (e.g., with the aid of various semi-automatic or automatic video tool operations), or through a combination of both methods. Such a recording mode is often referred to as “learn mode” or “training mode.” In either technique, the machine control instructions and individual video tool parameters are generally stored as a part program that is specific to the particular workpiece configuration, and automatically perform a predetermined sequence of inspection operations during a “run mode” of operation.
Accuracies in the micron or sub-micron range are often desired in such systems. This is particularly challenging with regard to Z-height measurements. Z-height measurements (along the optical axis and focusing axis of the camera system) are generally derived from a “best focus” position, such as that determined by an autofocus tool or method. As described in greater detail below with reference to FIG. 4, according to known autofocus methods and/or tools, the camera moves through a range of Z positions along a Z axis (the focusing axis) and captures an image at each Z position. For each captured image, a focus metric is calculated based on the image and related to its Z position. This results in a focus curve data, which may be referred to simply as a “focus curve” or “autofocus curve.” The peak of the focus curve corresponds to the best focus position along the Z axis and the Z height of the imaged surface.
One known method of autofocusing similar to that outlined above is discussed in “Robust Autofocusing in Microscopy,” by Jan-Mark Geusebroek and Arnold Smeulders in ISIS Technical Report Series, Vol. 17, November 2000, which is hereby incorporated herein by reference in its entirety. The disclosed method teaches that the video hardware captures frames at a fixed rate, and that the sampling density of the focusing curve can be influenced by adjusting the stage velocity. Another known autofocus method and apparatus is described in U.S. Pat. No. 5,790,710, which is hereby incorporated by reference in its entirety. Other improved autofocus systems and methods are described in U.S. Pat. Nos. 7,030,351; 8,111,905; and 8,111,938; and U.S. Pre-Grant Publication No. 2011/0133054, each of which is commonly assigned and hereby incorporated by reference in its entirety.
The level of accuracy and repeatability achieved for Z-height measurements, based on autofocus tools or operations, is generally less than that achieved for other measurement axes in precision machine vision inspection systems, particularly for certain types of workpiece features and/or orientations that are not easily recognized as problematic by typical users. It would be desirable for an autofocus tool to operate automatically with improved accuracy, repeatability, and robustness, for a wider variety of workpiece surface features and/or orientations, in order to allow more accurate and/or repeatable and/or robust Z-height measurements to be determined.